home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 1
/
CU Amiga Magazine CD-ROM Special Edition (1995)(EMAP Images)(GB)[Issue 1995-11].iso
/
Aminet
/
biz
/
demo
/
StylusDemo.lha
/
Stylus_Demo
/
REXX
/
Cartesian_Coords.pvrx
next >
Wrap
Text File
|
1994-08-10
|
1KB
|
47 lines
/***************************************************************************
* *
* $VER: Cartesian_Coords.pvrx 1.0 (10.Aug.94) *
* Copyright © 1994 by Stylus, Inc. *
* Author: Jeff Blume *
* *
* Set the page to a Cartesian coordinate system with the origin in the *
* center of the page. *
* *
* *
***************************************************************************/
/*
call open STDOUT,"RAD:RxOut.txt",W
call open STDERR,"RAD:RxErr.txt",W
trace R
*/
'Lock'
if rc ~= 0 then exit
'GetPageSize' Pdims
CPX = Pdims.X2 + Pdims.X1
if CPX ~= 0 then do
CPX = CPX / 2
Pdims.X1 = -CPX
Pdims.X2 = CPX
end
CPY = Pdims.Y2 + Pdims.Y1
if CPY ~= 0 then do
CPY = CPY / 2
Pdims.Y1 = CPY
Pdims.Y2 = -CPY
end
if CPX ~= 0 & CPY ~= 0 then 'SetPageSize' Pdims
else 'GetBool "Origin already centered." "OK" "OK"'
/* This doesn't cover case where origin is centered,
but Y axis is descending. */
'UnLock'
EXIT